/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 * 
 * If you have edited the file, please update
 * all the last-modified fields manually. Thanks!
 *
 * @last-modified by: 
 * @last-modified date: 
 * @last-modified time: 
 *
 * @author Swee Zhi
 * @date-created Oct 24, 2011    @time-created 3:43:53 PM
 *
 * @project: 
 * @module: 
 * @institution: 
 *
 */
package util.enumhelper;

import util.enumeration.ActivityType;
import util.enumeration.Language;

public class LocalizedActivityType {
    // alphabetical order
    public static String getLocalizedActivityTypeAsString(ActivityType activityType, String locale) {
        String localizedActivityType = "";
        
        // en_US ENGLISH, UNITED STATES
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.ENGLISH_US))) {
            localizedActivityType = getActivityType_EN_US(activityType);
        }
        // en_SG ENGLISH, SINGAPORE
        else
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.ENGLISH_SINGAPORE))) {
            localizedActivityType = getActivityType_EN_SG(activityType);
        }
        // ms_MY MALAY, MALAYSIA
        else
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.MALAY))) {
            localizedActivityType = getActivityType_MS_MY(activityType);
        }
        
        // zh_CN CHINESE, CHINA
        else
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.CHINESE_CHINA))) {
            localizedActivityType = getActivityType_ZH_CN(activityType);
        }
        // other activityType...
        else {
            localizedActivityType = getActivityType_EN_US(activityType);
        }
        
        return localizedActivityType;
    }
    
    // simplified chinese (zh_CN)
    private static String getActivityType_ZH_CN(ActivityType activityType) {
        String localizedActivityType = "";
        
        switch (activityType) {
            case BEAUTY: localizedActivityType = "美容" ; break;
            case CLUBBING: localizedActivityType = "泡吧"; break;
            case DINING: localizedActivityType = "餐饮"; break;
            case ENTERTAINMENT: localizedActivityType = "娱乐"; break;
            case PUBBING: localizedActivityType = "酒吧"; break;
            case REST_N_RELAX: localizedActivityType = "休息和放松" ; break;
            case SHOPPING: localizedActivityType = "购物"; break;
            case SIGHTSEEING: localizedActivityType = "观光"; break;
            case OTHER: localizedActivityType = "其他"; break;
        }
        return localizedActivityType;
    }
    
    // default (en_US)
    private static String getActivityType_EN_US(ActivityType activityType) {
        String localizedActivityType = "";
        
        switch (activityType) {
            case BEAUTY: localizedActivityType = "Beauty" ; break;
            case CLUBBING: localizedActivityType = "Clubbing"; break;
            case DINING: localizedActivityType = "Dining"; break;
            case ENTERTAINMENT: localizedActivityType = "Entertainment"; break;
            case PUBBING: localizedActivityType = "Pubbing"; break;
            case REST_N_RELAX: localizedActivityType = "Rest and Relax" ; break;
            case SHOPPING: localizedActivityType = "Shopping"; break;
            case SIGHTSEEING: localizedActivityType = "Sightseeing"; break;
            case OTHER: localizedActivityType = "Other"; break;
        }
        return localizedActivityType;
    }
    
    // singapore english (en_SG)
    private static String getActivityType_EN_SG(ActivityType activityType) {
        String localizedActivityType = "";
        
        switch (activityType) {
            case BEAUTY: localizedActivityType = "Beauty" ; break;
            case CLUBBING: localizedActivityType = "Clubbing"; break;
            case DINING: localizedActivityType = "Dining"; break;
            case ENTERTAINMENT: localizedActivityType = "Entertainment"; break;
            case PUBBING: localizedActivityType = "Pubbing"; break;
            case REST_N_RELAX: localizedActivityType = "Rest and Relax" ; break;
            case SHOPPING: localizedActivityType = "Shopping"; break;
            case SIGHTSEEING: localizedActivityType = "Sightseeing"; break;
            case OTHER: localizedActivityType = "Other"; break;
        }
        return localizedActivityType;
    }
    
    // bahasa malaysia (ms_MY)
    private static String getActivityType_MS_MY(ActivityType activityType) {
        String localizedActivityType = "";
        
        switch (activityType) {
            case BEAUTY: localizedActivityType = "Beauti" ; break;
            case CLUBBING: localizedActivityType = "Kepompong"; break;
            case DINING: localizedActivityType = "Makan"; break;
            case ENTERTAINMENT: localizedActivityType = "Hiburan"; break;
            case PUBBING: localizedActivityType = "Pub"; break;
            case REST_N_RELAX: localizedActivityType = "Berehat dan Bersantai" ; break;
            case SHOPPING: localizedActivityType = "Belanja"; break;
            case SIGHTSEEING: localizedActivityType = "Bersiar-siar"; break;
            case OTHER: localizedActivityType = "Lain"; break;
        }
        return localizedActivityType;
    }
    
    // new activityType for localized activityType template (copy and paste to use)
//    private static String getActivityType_XX_YY(ActivityType activityType) {
//        String localizedActivityType = "";
//        
//        switch (activityType) {
//            case CHINESE_CHINA: localizedActivityType = ""; break;
//            case ENGLISH_US: localizedActivityType = ""; break;
//            case ENGLISH_SINGAPORE: localizedActivityType = ""; break;
//            case MALAY: localizedActivityType = ""; break;
//        }
//        return localizedActivityType;
//    }
}
